package com.ssfeng.youxia;

import com.ssfeng.youxia.config.TestConfig;
import com.ssfeng.youxia.services.TestAopService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;

/**
 * Created by liyuhang on 2020-04-19.
 */
public class Application {


    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext();
        annotationConfigApplicationContext.register(TestConfig.class);
        annotationConfigApplicationContext.refresh();
        TestAopService testAopService = annotationConfigApplicationContext.getBean(TestAopService.class);
        testAopService.sayHello();
        System.in.read();
//        annotationConfigApplicationContext.getResource();
    }
}
